package com.joysuch.wwyt.mh.enums;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;

public enum AlarmRecordStateEnum {

    NO(0, "否"),
    YES(1, "是");

    private Integer value;

    private String desc;

    AlarmRecordStateEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public final Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    private static final Map<Integer, AlarmRecordStateEnum> lookup = new HashMap<>();

    static {
        for (AlarmRecordStateEnum e : EnumSet.allOf(AlarmRecordStateEnum.class)) {
            lookup.put(e.value, e);
        }
    }

    public static AlarmRecordStateEnum find(String value) {
        return lookup.get(value);
    }
}
